/*
 * Copyright(c) 2020-2100 万达信息股份有限公司 版权所有
 * WONDERS INFORMATION CO., LTD. ALL RIGHTS RESERVED.
 */

package com.wondersgroup.feignclients;

import com.wondersgroup.entity.Product;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * @author: huym
 * @version: 1.0
 * @date: 2020/11/19
 */
@Component
public class ProductFallBack implements ProductClient {
    @Override
    public String showMsg() {
        return "服务暂时不可用，降级啦。。。。。。";
    }

    @Override
    public Map<String, Object> findOne(String productId) {
        Map<String, Object> map = new HashMap<>();
        map.put("msg","服务暂时不可用");
        map.put("status",false);
        return map;
    }

    @Override
    public Map<String, Object> save(String name) {
        Map<String, Object> map = new HashMap<>();
        map.put("msg","服务暂时不可用");
        map.put("status",false);
        return map;
    }

    @Override
    public Map<String, Object> saveProduct(Product product) {
        Map<String, Object> map = new HashMap<>();
        map.put("msg","服务暂时不可用");
        map.put("status",false);
        return map;
    }

    @Override
    public Map<String, Object> complex(Product product, String name) {
        Map<String, Object> map = new HashMap<>();
        map.put("msg","服务暂时不可用");
        map.put("status",false);
        return map;
    }
}
